// BranchTableRecord.h: interface for the BranchTableRecord class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BRANCHTABLERECORD_H__3953B090_E6A4_4EB6_BEB2_52212794DD38__INCLUDED_)
#define AFX_BRANCHTABLERECORD_H__3953B090_E6A4_4EB6_BEB2_52212794DD38__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Unit.h"

namespace PDMS
{
	namespace PDMSDBIF
	{
		class BranchTableRecord  
		{	
		public:
			BranchTableRecord();
			~BranchTableRecord();
		public:
			unsigned long GetID()
			{
				return m_lID;
			}

			void SetID( unsigned long lID )
			{
				m_lID = lID;
			}

			TemperatureUnit GetTemperature()
			{
				return TemperatureUnit( m_dTemperature );
			}

			void SetTemperature( const TemperatureUnit& buf)
			{
				TemperatureUnit temp = buf;
				m_dTemperature = temp.GetValue();
			}

			BOOL GetBuildFlag()
			{
				return m_bBuildFlag;
			}

			void SetBuilFlag( BOOL bflag )
			{
				m_bBuildFlag = bflag;
			}

			BOOL GetShopFlag()
			{
				return m_bShopFlag;
			}

			void SetShopFlag( BOOL bflag )
			{
				m_bShopFlag = bflag;
			}

			LengthUnit GetHeadBore()
			{
				return LengthUnit( m_dHeadBore );
			}

			void SetHeadBore( const LengthUnit& dbuf )
			{
				m_dHeadBore = const_cast<LengthUnit&>( dbuf ).GetValue();
			}

			LengthUnit GetTailBore()
			{
				return LengthUnit( m_dTailBore );
			}

			void SetTailBore( const LengthUnit& dbuf )
			{
				m_dTailBore = const_cast<LengthUnit&>( dbuf ).GetValue();
			}

			const UeGeVector3d GetHeadDir()
			{
				return UeGeVector3d( m_dHeadDirX, m_dHeadDirY, m_dHeadDirZ );
			}

			void SetHeadDir( const UeGeVector3d& bufvec )
			{
				m_dHeadDirX = bufvec.x;
				m_dHeadDirY = bufvec.y;
				m_dHeadDirZ = bufvec.z;
			}

			const UeGePoint3d GetHeadPos()
			{
				return UeGePoint3d( m_dHeadPosX, m_dHeadPosY, m_dHeadPosZ );
			}

			void SetHeadPos( const UeGePoint3d& bufpos )
			{
				m_dHeadPosX = bufpos.x;
				m_dHeadPosY = bufpos.y;
				m_dHeadPosZ = bufpos.z;
			}

			PressureUnit GetPressure()
			{
				return PressureUnit( m_dPressure );
			}

			void SetPressure( const PressureUnit& buf )
			{
				PressureUnit temp = buf;
				m_dPressure = temp.GetValue();
			}

			const StdString& GetCaseRef()
			{
				return m_strCaseRef;
			}

			void SetCaseRef( const StdString& strbuf )
			{
				m_strCaseRef = strbuf;
			}

			const StdString& GetDescription()
			{
				return m_strDescription;
			}

			void SetDescription( const StdString& strbuf )
			{
				m_strDescription = strbuf;
			}

			const StdString& GetFluRef()
			{
				return m_strFluRef;
			}

			void SetFluRef( const StdString& strbuf )
			{
				m_strFluRef = strbuf;
			}

			const StdString& GetFunction()
			{
				return m_strFunction;
			}

			void SetFunction( const StdString& strbuf )
			{
				m_strFunction = strbuf;
			}

			const StdString& GetHeadConn()
			{
				return m_strHConn;
			}
			
			void SetHeadConn( const StdString& strbuf )
			{
				m_strHConn = strbuf;
			}

			const StdString& GetHeadRef()
			{
				return m_strHRef;
			}

			void SetHeadRef( const StdString& strbuf )
			{
				m_strHRef = strbuf;
			}

			const StdString& GetHstube()
			{
				return m_strHstube;
			}

			void SetHstube( const StdString& strbuf )
			{
				m_strHstube = strbuf;
			}

			const StdString& GetIspec()
			{
				return m_strIspec;
			}

			void SetIspec( const StdString& strbuf )
			{
				m_strIspec = strbuf;
			}

			const StdString& GetMatRef()
			{
				return m_strMatref;
			}

			void SetMatRef( const StdString& strbuf )
			{
				m_strMatref = strbuf;
			}

			const StdString& GetPspec()
			{
				return m_strPspec;
			}

			void SetPspec( const StdString& strbuf )
			{
				m_strPspec = strbuf;
			}

			const StdString& GetPurpose()
			{
				return m_strPurpose;
			}

			void SetPurpose( const StdString& strbuf )
			{
				m_strPurpose = strbuf;
			}

			const StdString& GetTailConn()
			{
				return m_strTConn;
			}

			void SetTailConn( const StdString& strbuf )
			{
				m_strTConn = strbuf;
			}

			const StdString& GetTailRef()
			{
				return m_strTRef;
			}

			void SetTailRef( const StdString& strbuf )
			{
				m_strTRef = strbuf;
			}

			const StdString& GetTspec()
			{
				return m_strTspec;
			}

			void SetTspec( const StdString& strbuf )
			{
				m_strTspec = strbuf;
			}

			unsigned long GetParentID()
			{
				return m_lParentID;
			}

			void SetParentID( unsigned long lID)
			{
				m_lParentID = lID;
			}

			const StdString& GetPaintRef()
			{
				return m_strPtspec;
			}

			void SetPaintRef( const StdString& strbuf )
			{
				m_strPtspec = strbuf;
			}

			const UeGePoint3d GetTailPos()
			{
				return UeGePoint3d( m_dTailPosX, m_dTailPosY, m_dTailPosZ );			
			}

			void SetTailPos( const UeGePoint3d& tpos )
			{
				m_dTailPosX = tpos.x;
				m_dTailPosY = tpos.y;
				m_dTailPosZ = tpos.z;
			}

			const UeGeVector3d GetTailDir()
			{
				return UeGeVector3d( m_dTailDirX, m_dTailDirY, m_dTailDirZ );
			}

			void SetTailDir( const UeGeVector3d& tdir )
			{
				m_dTailDirX = tdir.x;
				m_dTailDirY = tdir.y;
				m_dTailDirZ = tdir.z;
			}

		private:
			unsigned long m_lID;
			BOOL m_bBuildFlag;
			BOOL m_bShopFlag;
			double m_dHeadBore;
			double m_dTailBore;
			double m_dPressure;
			double m_dHeadPosX;
			double m_dHeadPosY;
			double m_dHeadPosZ;
			double m_dHeadDirX;
			double m_dHeadDirY;
			double m_dHeadDirZ;
			double m_dTailPosX;
			double m_dTailPosY;
			double m_dTailPosZ;
			double m_dTailDirX;
			double m_dTailDirY;
			double m_dTailDirZ;
			StdString m_strCaseRef;
			StdString m_strDescription;
			StdString m_strFluRef;
			StdString m_strFunction;
			StdString m_strHConn;
			StdString m_strHRef;
			StdString m_strHstube;
			StdString m_strIspec;
			StdString m_strMatref;
			StdString m_strPspec;
			StdString m_strPurpose;
			StdString m_strPtspec;
			StdString m_strTConn;
			StdString m_strTRef;
			StdString m_strTspec;
			double	m_dTemperature;
			unsigned long m_lParentID;

		};
	}
}
#endif // !defined(AFX_BRANCHTABLERECORD_H__3953B090_E6A4_4EB6_BEB2_52212794DD38__INCLUDED_)
